package com.wanmait.teatrain.dto;

import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;

@Data
@Accessors(chain = true)
public class LoginDTO {
    @NotEmpty(message = "用户名不能为空")
    @Length(min = 2,max = 20,message = "用户名长度必须在3~10之间")
    private String username;
    @NotEmpty(message = "密码不能为空")
    @Length(min = 2,max = 30,message = "密码长度必须在3~10之间")
    private String password;
    @NotEmpty(message = "验证码不能为空")
    private String code;
    private String codeKey;
}
